//
//  ViewController.m
//  10507图片浏览器
//
//  Created by student on 16/2/20.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *label1;
@property (strong, nonatomic) IBOutlet UILabel *label2;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end
static int num;
@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)BtnPressed:(UIButton *)sender {
    if (sender.tag==0) {
        num--;
        if (num<0) {
            num=num+5;
        }
    
    }
    else{
        num++;
    }
    switch (num%5) {
        case 0:
            self.imageView.image=[UIImage imageNamed:@"biaoqingdi"];
            self.label2.text=@"在他面前,什么都弱爆了!";
            break;
        case 1:
            self.imageView.image=[UIImage imageNamed:@"bingli"];
            self.label2.text=@"这也忒狠了";
            break;
        case 2:
            self.imageView.image=[UIImage imageNamed:@"chiniupa"];
            self.label2.text=@"这小姑娘吃个牛排比杀牛还费劲啊";
            break;
        case 3:
            self.imageView.image=[UIImage imageNamed:@"danteng"];
            self.label2.text=@"亲，你能改下你的网名么？哈哈";
            break;
        case 4:
            self.imageView.image=[UIImage imageNamed:@"wangba"];
            self.label2.text=@"哥们为什么选八号呢";
            break;
            
        default:
            break;
    }
     self.label1.text=[NSString stringWithFormat:@"%i/4",num%5];
}

@end
